package com.chao.juc.thread;

import java.util.concurrent.Callable;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @author : Rookie
 * @description : 线程的执行顺序不确定
 * @date : 2022/1/9
 */
public class Test1 {
    public static void main(String[] args) {
        //获取主机cpu的核数
        System.out.println(Runtime.getRuntime().availableProcessors());

        Thread thread1 = new Thread(() -> {
            System.out.println("thread1");
        });
        Thread thread2 = new Thread(() -> {
            System.out.println("thread2");
        });
        Thread thread3 = new Thread(() -> {
            System.out.println("thread3");
        });
        thread1.start();
        thread2.start();
        thread3.start();

    }
}
